<html>
<head>
  <style>
    iframe {
      height: 150px;
      width: 150px;
    }
  </style>
  <script>
    function doTest()
    {
      document.getElementById('iframe').contentDocument.body.offsetWidth; // See wkbug.com/41999
      if (window.testRunner) {
        testRunner.dumpAsText();
        document.getElementById('layertree').innerText = internals.layerTreeAsText(document);
      }
    }
    window.addEventListener("load", doTest, false);
    if (window.internals) {
      internals.settings.setPreferCompositingToLCDTextEnabled(true);
    }
  </script>
</head>
<body>
  <!-- this should not generate a layer and the layer tree should be empty -->
  <iframe id="iframe" src="resources/subframe-small.html"></iframe>
  <pre id="layertree"></pre>
</body>
</html>
